<?php
namespace  app\home\validate;

use think\Validate;

class User extends Validate{

protected  $reule = [
    'username'=>'require|max:50|uique:users',
    'password'=>'require|max:20',
    'password1'=>'require',
    'mobilenum'=>'require|number|between:0,9',
    'email'=>'email',
    'captcha|验证码'=>'require|captcha'
];
protected  $message = [
    'username.require'=>'用户名不能为空',
    'username.max'=>'用户名过长',
    'username.unique'=>'用户名已存在',
    'userpass.require'=>'密码不能为空',
    'userpass.max'=>'密码过长',
    'userpass1.require'=>'确认密码为空',
    'mobilenum.require'=>'手机号不能为空',
    'mobile.number'=>'手机号必须为数字',
    'mobile.between'=>'手机号必须是0-9的数字',
    'email'=>'邮箱格式错误',
    'captcha.require'=>'验证码为空',
    'message.max'=>'评论过长',
    ];



}
